using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VKSMK
    {
        public DataRow Convert2KSMK(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryKSMK(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["KSMKMANDANT"] = " ".PadRight(2 ); 
         dwReturn["KSMKJHJJ"] = " ".PadRight(0 ); 
         dwReturn["KSMKMM"] = " ".PadRight(0 ); 
         dwReturn["KSMKKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["KSMKKST"] = " ".PadRight(4 ); 
         dwReturn["KSMKAENZL"] = " ".PadRight(0 ); 
         dwReturn["KSMKAENB"] = " ".PadRight(8 ); 
         dwReturn["KSMKAEND"] = " ".PadRight(0 ); 
         dwReturn["KSMKNEUB"] = " ".PadRight(8 ); 
         dwReturn["KSMKNEUD"] = " ".PadRight(0 ); 
         dwReturn["KSMKFJ"] = " ".PadRight(5 ); 
         dwReturn["KSMKPER"] = " ".PadRight(0 ); 
         dwReturn["KSMKME"] = " ".PadRight(1 ); 
         dwReturn["KSMKJA"] = " ".PadRight(0 ); 
         dwReturn["KSMKPROZNA"] = " ".PadRight(0 ); 
         dwReturn["KSMKPROZLS"] = " ".PadRight(0 ); 
         dwReturn["KSMKPZWECK"] = " ".PadRight(5 ); 
         dwReturn["KSMKPVER"] = " ".PadRight(1 ); 
         dwReturn["KSMKPUZWECK"] = " ".PadRight(5 ); 
         dwReturn["KSMKPUVER"] = " ".PadRight(1 ); 
         dwReturn["KSMKSZWECK"] = " ".PadRight(5 ); 
         dwReturn["KSMKSVER"] = " ".PadRight(1 ); 
         dwReturn["KSMKIZWECK"] = " ".PadRight(5 ); 
         dwReturn["KSMKIVER"] = " ".PadRight(1 ); 
         dwReturn["KSMKBEM"] = " ".PadRight(60 ); 
         dwReturn["KSMKPPROZ"] = " ".PadRight(0 ); 
         dwReturn["KSMKPKOST1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPKOST2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPKOST3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPKOST4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPKOST5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRPT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRPTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRPTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRPTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRPTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPRPTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZG1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZG2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZG3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZG4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZG5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPPZG6"] = " ".PadRight(0 ); 
         dwReturn["KSMKPLZTST"] = " ".PadRight(0 ); 
         dwReturn["KSMKPNA"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMG"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMKME"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMK"] = " ".PadRight(0 ); 
         dwReturn["KSMKPMKF"] = " ".PadRight(0 ); 
         dwReturn["KSMKPERL"] = " ".PadRight(0 ); 
         dwReturn["KSMKPDAT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPROZ"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUKOST1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUKOST2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUKOST3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUKOST4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUKOST5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURPT"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURPTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURPTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURPTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURPTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPURPTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZG1"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZG2"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZG3"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZG4"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZG5"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUPZG6"] = " ".PadRight(0 ); 
         dwReturn["KSMKPULZTST"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUNA"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMG"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMKME"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMK"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUMKF"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUERL"] = " ".PadRight(0 ); 
         dwReturn["KSMKPUDAT"] = " ".PadRight(0 ); 
         dwReturn["KSMKSKOST1"] = " ".PadRight(0 ); 
         dwReturn["KSMKSKOST2"] = " ".PadRight(0 ); 
         dwReturn["KSMKSKOST3"] = " ".PadRight(0 ); 
         dwReturn["KSMKSKOST4"] = " ".PadRight(0 ); 
         dwReturn["KSMKSKOST5"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKSPZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKSPZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKSPZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKSPZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKSPZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKSPZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRPT"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRPTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRPTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRPTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRPTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKSRPTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKSLZTST"] = " ".PadRight(0 ); 
         dwReturn["KSMKSNA"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMG"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMKME"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMK"] = " ".PadRight(0 ); 
         dwReturn["KSMKSMKF"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOST1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOST2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOST3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOST4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOST5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZT"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPT"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTK1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTK2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTK3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTK4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTK5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZG1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZG2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZG3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZG4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZG5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZG6"] = " ".PadRight(0 ); 
         dwReturn["KSMKILZTST"] = " ".PadRight(0 ); 
         dwReturn["KSMKINA"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMG"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMKME"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMK"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMKF"] = " ".PadRight(0 ); 
         dwReturn["KSMKISBK"] = " ".PadRight(0 ); 
         dwReturn["KSMKIBNA"] = " ".PadRight(0 ); 
         dwReturn["KSMKIBZW"] = " ".PadRight(0 ); 
         dwReturn["KSMKIBVERL"] = " ".PadRight(0 ); 
         dwReturn["KSMKIERL"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOSTI1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOSTI2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOSTI3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOSTI4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIKOSTI5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTKI1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTKI2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTKI3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTKI4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIMZTKI5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTKI1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTKI2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTKI3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTKI4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIPZTKI5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTKI1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTKI2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTKI3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTKI4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRZTKI5"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTKI1"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTKI2"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTKI3"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTKI4"] = " ".PadRight(0 ); 
         dwReturn["KSMKIRPTKI5"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapKSMK(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveKSMK(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryKSMK(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapKSMK(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertKSMK(dwLocal, ITXDBVERSION);
            }
            UpdateKSMK(dwLocal);
        }
        public void InsertKSMK(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO KSMK(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryKSMK(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM KSMK WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM KSMK  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "KSMK";
            Return = Result;
            return Return;
        }
        public void DeleteKSMK(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM KSMK   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateKSMK(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE KSMK SET "
                    +"KSMKMANDANT= :KSMKMANDANT,"
                    +"KSMKJHJJ= :KSMKJHJJ,"
                    +"KSMKMM= :KSMKMM,"
                    +"KSMKKSTKRS= :KSMKKSTKRS,"
                    +"KSMKKST= :KSMKKST,"
                    +"KSMKAENZL= :KSMKAENZL,"
                    +"KSMKAENB= :KSMKAENB,"
                    +"KSMKAEND= :KSMKAEND,"
                    +"KSMKNEUB= :KSMKNEUB,"
                    +"KSMKNEUD= :KSMKNEUD,"
                    +"KSMKFJ= :KSMKFJ,"
                    +"KSMKPER= :KSMKPER,"
                    +"KSMKME= :KSMKME,"
                    +"KSMKJA= :KSMKJA,"
                    +"KSMKPROZNA= :KSMKPROZNA,"
                    +"KSMKPROZLS= :KSMKPROZLS,"
                    +"KSMKPZWECK= :KSMKPZWECK,"
                    +"KSMKPVER= :KSMKPVER,"
                    +"KSMKPUZWECK= :KSMKPUZWECK,"
                    +"KSMKPUVER= :KSMKPUVER,"
                    +"KSMKSZWECK= :KSMKSZWECK,"
                    +"KSMKSVER= :KSMKSVER,"
                    +"KSMKIZWECK= :KSMKIZWECK,"
                    +"KSMKIVER= :KSMKIVER,"
                    +"KSMKBEM= :KSMKBEM,"
                    +"KSMKPPROZ= :KSMKPPROZ,"
                    +"KSMKPKOST1= :KSMKPKOST1,"
                    +"KSMKPKOST2= :KSMKPKOST2,"
                    +"KSMKPKOST3= :KSMKPKOST3,"
                    +"KSMKPKOST4= :KSMKPKOST4,"
                    +"KSMKPKOST5= :KSMKPKOST5,"
                    +"KSMKPMZT= :KSMKPMZT,"
                    +"KSMKPMZTK1= :KSMKPMZTK1,"
                    +"KSMKPMZTK2= :KSMKPMZTK2,"
                    +"KSMKPMZTK3= :KSMKPMZTK3,"
                    +"KSMKPMZTK4= :KSMKPMZTK4,"
                    +"KSMKPMZTK5= :KSMKPMZTK5,"
                    +"KSMKPPZT= :KSMKPPZT,"
                    +"KSMKPPZTK1= :KSMKPPZTK1,"
                    +"KSMKPPZTK2= :KSMKPPZTK2,"
                    +"KSMKPPZTK3= :KSMKPPZTK3,"
                    +"KSMKPPZTK4= :KSMKPPZTK4,"
                    +"KSMKPPZTK5= :KSMKPPZTK5,"
                    +"KSMKPRZT= :KSMKPRZT,"
                    +"KSMKPRZTK1= :KSMKPRZTK1,"
                    +"KSMKPRZTK2= :KSMKPRZTK2,"
                    +"KSMKPRZTK3= :KSMKPRZTK3,"
                    +"KSMKPRZTK4= :KSMKPRZTK4,"
                    +"KSMKPRZTK5= :KSMKPRZTK5,"
                    +"KSMKPRPT= :KSMKPRPT,"
                    +"KSMKPRPTK1= :KSMKPRPTK1,"
                    +"KSMKPRPTK2= :KSMKPRPTK2,"
                    +"KSMKPRPTK3= :KSMKPRPTK3,"
                    +"KSMKPRPTK4= :KSMKPRPTK4,"
                    +"KSMKPRPTK5= :KSMKPRPTK5,"
                    +"KSMKPPZG1= :KSMKPPZG1,"
                    +"KSMKPPZG2= :KSMKPPZG2,"
                    +"KSMKPPZG3= :KSMKPPZG3,"
                    +"KSMKPPZG4= :KSMKPPZG4,"
                    +"KSMKPPZG5= :KSMKPPZG5,"
                    +"KSMKPPZG6= :KSMKPPZG6,"
                    +"KSMKPLZTST= :KSMKPLZTST,"
                    +"KSMKPNA= :KSMKPNA,"
                    +"KSMKPMG= :KSMKPMG,"
                    +"KSMKPMKME= :KSMKPMKME,"
                    +"KSMKPMK= :KSMKPMK,"
                    +"KSMKPMKF= :KSMKPMKF,"
                    +"KSMKPERL= :KSMKPERL,"
                    +"KSMKPDAT= :KSMKPDAT,"
                    +"KSMKPUPROZ= :KSMKPUPROZ,"
                    +"KSMKPUKOST1= :KSMKPUKOST1,"
                    +"KSMKPUKOST2= :KSMKPUKOST2,"
                    +"KSMKPUKOST3= :KSMKPUKOST3,"
                    +"KSMKPUKOST4= :KSMKPUKOST4,"
                    +"KSMKPUKOST5= :KSMKPUKOST5,"
                    +"KSMKPUMZT= :KSMKPUMZT,"
                    +"KSMKPUMZTK1= :KSMKPUMZTK1,"
                    +"KSMKPUMZTK2= :KSMKPUMZTK2,"
                    +"KSMKPUMZTK3= :KSMKPUMZTK3,"
                    +"KSMKPUMZTK4= :KSMKPUMZTK4,"
                    +"KSMKPUMZTK5= :KSMKPUMZTK5,"
                    +"KSMKPUPZT= :KSMKPUPZT,"
                    +"KSMKPUPZTK1= :KSMKPUPZTK1,"
                    +"KSMKPUPZTK2= :KSMKPUPZTK2,"
                    +"KSMKPUPZTK3= :KSMKPUPZTK3,"
                    +"KSMKPUPZTK4= :KSMKPUPZTK4,"
                    +"KSMKPUPZTK5= :KSMKPUPZTK5,"
                    +"KSMKPURZT= :KSMKPURZT,"
                    +"KSMKPURZTK1= :KSMKPURZTK1,"
                    +"KSMKPURZTK2= :KSMKPURZTK2,"
                    +"KSMKPURZTK3= :KSMKPURZTK3,"
                    +"KSMKPURZTK4= :KSMKPURZTK4,"
                    +"KSMKPURZTK5= :KSMKPURZTK5,"
                    +"KSMKPURPT= :KSMKPURPT,"
                    +"KSMKPURPTK1= :KSMKPURPTK1,"
                    +"KSMKPURPTK2= :KSMKPURPTK2,"
                    +"KSMKPURPTK3= :KSMKPURPTK3,"
                    +"KSMKPURPTK4= :KSMKPURPTK4,"
                    +"KSMKPURPTK5= :KSMKPURPTK5,"
                    +"KSMKPUPZG1= :KSMKPUPZG1,"
                    +"KSMKPUPZG2= :KSMKPUPZG2,"
                    +"KSMKPUPZG3= :KSMKPUPZG3,"
                    +"KSMKPUPZG4= :KSMKPUPZG4,"
                    +"KSMKPUPZG5= :KSMKPUPZG5,"
                    +"KSMKPUPZG6= :KSMKPUPZG6,"
                    +"KSMKPULZTST= :KSMKPULZTST,"
                    +"KSMKPUNA= :KSMKPUNA,"
                    +"KSMKPUMG= :KSMKPUMG,"
                    +"KSMKPUMKME= :KSMKPUMKME,"
                    +"KSMKPUMK= :KSMKPUMK,"
                    +"KSMKPUMKF= :KSMKPUMKF,"
                    +"KSMKPUERL= :KSMKPUERL,"
                    +"KSMKPUDAT= :KSMKPUDAT,"
                    +"KSMKSKOST1= :KSMKSKOST1,"
                    +"KSMKSKOST2= :KSMKSKOST2,"
                    +"KSMKSKOST3= :KSMKSKOST3,"
                    +"KSMKSKOST4= :KSMKSKOST4,"
                    +"KSMKSKOST5= :KSMKSKOST5,"
                    +"KSMKSMZT= :KSMKSMZT,"
                    +"KSMKSMZTK1= :KSMKSMZTK1,"
                    +"KSMKSMZTK2= :KSMKSMZTK2,"
                    +"KSMKSMZTK3= :KSMKSMZTK3,"
                    +"KSMKSMZTK4= :KSMKSMZTK4,"
                    +"KSMKSMZTK5= :KSMKSMZTK5,"
                    +"KSMKSPZT= :KSMKSPZT,"
                    +"KSMKSPZTK1= :KSMKSPZTK1,"
                    +"KSMKSPZTK2= :KSMKSPZTK2,"
                    +"KSMKSPZTK3= :KSMKSPZTK3,"
                    +"KSMKSPZTK4= :KSMKSPZTK4,"
                    +"KSMKSPZTK5= :KSMKSPZTK5,"
                    +"KSMKSRZT= :KSMKSRZT,"
                    +"KSMKSRZTK1= :KSMKSRZTK1,"
                    +"KSMKSRZTK2= :KSMKSRZTK2,"
                    +"KSMKSRZTK3= :KSMKSRZTK3,"
                    +"KSMKSRZTK4= :KSMKSRZTK4,"
                    +"KSMKSRZTK5= :KSMKSRZTK5,"
                    +"KSMKSRPT= :KSMKSRPT,"
                    +"KSMKSRPTK1= :KSMKSRPTK1,"
                    +"KSMKSRPTK2= :KSMKSRPTK2,"
                    +"KSMKSRPTK3= :KSMKSRPTK3,"
                    +"KSMKSRPTK4= :KSMKSRPTK4,"
                    +"KSMKSRPTK5= :KSMKSRPTK5,"
                    +"KSMKSLZTST= :KSMKSLZTST,"
                    +"KSMKSNA= :KSMKSNA,"
                    +"KSMKSMG= :KSMKSMG,"
                    +"KSMKSMKME= :KSMKSMKME,"
                    +"KSMKSMK= :KSMKSMK,"
                    +"KSMKSMKF= :KSMKSMKF,"
                    +"KSMKIKOST1= :KSMKIKOST1,"
                    +"KSMKIKOST2= :KSMKIKOST2,"
                    +"KSMKIKOST3= :KSMKIKOST3,"
                    +"KSMKIKOST4= :KSMKIKOST4,"
                    +"KSMKIKOST5= :KSMKIKOST5,"
                    +"KSMKIMZT= :KSMKIMZT,"
                    +"KSMKIMZTK1= :KSMKIMZTK1,"
                    +"KSMKIMZTK2= :KSMKIMZTK2,"
                    +"KSMKIMZTK3= :KSMKIMZTK3,"
                    +"KSMKIMZTK4= :KSMKIMZTK4,"
                    +"KSMKIMZTK5= :KSMKIMZTK5,"
                    +"KSMKIPZT= :KSMKIPZT,"
                    +"KSMKIPZTK1= :KSMKIPZTK1,"
                    +"KSMKIPZTK2= :KSMKIPZTK2,"
                    +"KSMKIPZTK3= :KSMKIPZTK3,"
                    +"KSMKIPZTK4= :KSMKIPZTK4,"
                    +"KSMKIPZTK5= :KSMKIPZTK5,"
                    +"KSMKIRZT= :KSMKIRZT,"
                    +"KSMKIRZTK1= :KSMKIRZTK1,"
                    +"KSMKIRZTK2= :KSMKIRZTK2,"
                    +"KSMKIRZTK3= :KSMKIRZTK3,"
                    +"KSMKIRZTK4= :KSMKIRZTK4,"
                    +"KSMKIRZTK5= :KSMKIRZTK5,"
                    +"KSMKIRPT= :KSMKIRPT,"
                    +"KSMKIRPTK1= :KSMKIRPTK1,"
                    +"KSMKIRPTK2= :KSMKIRPTK2,"
                    +"KSMKIRPTK3= :KSMKIRPTK3,"
                    +"KSMKIRPTK4= :KSMKIRPTK4,"
                    +"KSMKIRPTK5= :KSMKIRPTK5,"
                    +"KSMKIPZG1= :KSMKIPZG1,"
                    +"KSMKIPZG2= :KSMKIPZG2,"
                    +"KSMKIPZG3= :KSMKIPZG3,"
                    +"KSMKIPZG4= :KSMKIPZG4,"
                    +"KSMKIPZG5= :KSMKIPZG5,"
                    +"KSMKIPZG6= :KSMKIPZG6,"
                    +"KSMKILZTST= :KSMKILZTST,"
                    +"KSMKINA= :KSMKINA,"
                    +"KSMKIMG= :KSMKIMG,"
                    +"KSMKIMKME= :KSMKIMKME,"
                    +"KSMKIMK= :KSMKIMK,"
                    +"KSMKIMKF= :KSMKIMKF,"
                    +"KSMKISBK= :KSMKISBK,"
                    +"KSMKIBNA= :KSMKIBNA,"
                    +"KSMKIBZW= :KSMKIBZW,"
                    +"KSMKIBVERL= :KSMKIBVERL,"
                    +"KSMKIERL= :KSMKIERL,"
                    +"KSMKIKOSTI1= :KSMKIKOSTI1,"
                    +"KSMKIKOSTI2= :KSMKIKOSTI2,"
                    +"KSMKIKOSTI3= :KSMKIKOSTI3,"
                    +"KSMKIKOSTI4= :KSMKIKOSTI4,"
                    +"KSMKIKOSTI5= :KSMKIKOSTI5,"
                    +"KSMKIMZTKI1= :KSMKIMZTKI1,"
                    +"KSMKIMZTKI2= :KSMKIMZTKI2,"
                    +"KSMKIMZTKI3= :KSMKIMZTKI3,"
                    +"KSMKIMZTKI4= :KSMKIMZTKI4,"
                    +"KSMKIMZTKI5= :KSMKIMZTKI5,"
                    +"KSMKIPZTKI1= :KSMKIPZTKI1,"
                    +"KSMKIPZTKI2= :KSMKIPZTKI2,"
                    +"KSMKIPZTKI3= :KSMKIPZTKI3,"
                    +"KSMKIPZTKI4= :KSMKIPZTKI4,"
                    +"KSMKIPZTKI5= :KSMKIPZTKI5,"
                    +"KSMKIRZTKI1= :KSMKIRZTKI1,"
                    +"KSMKIRZTKI2= :KSMKIRZTKI2,"
                    +"KSMKIRZTKI3= :KSMKIRZTKI3,"
                    +"KSMKIRZTKI4= :KSMKIRZTKI4,"
                    +"KSMKIRZTKI5= :KSMKIRZTKI5,"
                    +"KSMKIRPTKI1= :KSMKIRPTKI1,"
                    +"KSMKIRPTKI2= :KSMKIRPTKI2,"
                    +"KSMKIRPTKI3= :KSMKIRPTKI3,"
                    +"KSMKIRPTKI4= :KSMKIRPTKI4,"
                    +"KSMKIRPTKI5= :KSMKIRPTKI5,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("KSMKMANDANT", OracleType.NVarChar).Value = dwData["KSMKMANDANT"].ToString(); 
          or1.Parameters.Add("KSMKJHJJ", OracleType.NVarChar).Value = dwData["KSMKJHJJ"].ToString(); 
          or1.Parameters.Add("KSMKMM", OracleType.NVarChar).Value = dwData["KSMKMM"].ToString(); 
          or1.Parameters.Add("KSMKKSTKRS", OracleType.NVarChar).Value = dwData["KSMKKSTKRS"].ToString(); 
          or1.Parameters.Add("KSMKKST", OracleType.NVarChar).Value = dwData["KSMKKST"].ToString(); 
          or1.Parameters.Add("KSMKAENZL", OracleType.NVarChar).Value = dwData["KSMKAENZL"].ToString(); 
          or1.Parameters.Add("KSMKAENB", OracleType.NVarChar).Value = dwData["KSMKAENB"].ToString(); 
          or1.Parameters.Add("KSMKAEND", OracleType.NVarChar).Value = dwData["KSMKAEND"].ToString(); 
          or1.Parameters.Add("KSMKNEUB", OracleType.NVarChar).Value = dwData["KSMKNEUB"].ToString(); 
          or1.Parameters.Add("KSMKNEUD", OracleType.NVarChar).Value = dwData["KSMKNEUD"].ToString(); 
          or1.Parameters.Add("KSMKFJ", OracleType.NVarChar).Value = dwData["KSMKFJ"].ToString(); 
          or1.Parameters.Add("KSMKPER", OracleType.NVarChar).Value = dwData["KSMKPER"].ToString(); 
          or1.Parameters.Add("KSMKME", OracleType.NVarChar).Value = dwData["KSMKME"].ToString(); 
          or1.Parameters.Add("KSMKJA", OracleType.NVarChar).Value = dwData["KSMKJA"].ToString(); 
          or1.Parameters.Add("KSMKPROZNA", OracleType.NVarChar).Value = dwData["KSMKPROZNA"].ToString(); 
          or1.Parameters.Add("KSMKPROZLS", OracleType.NVarChar).Value = dwData["KSMKPROZLS"].ToString(); 
          or1.Parameters.Add("KSMKPZWECK", OracleType.NVarChar).Value = dwData["KSMKPZWECK"].ToString(); 
          or1.Parameters.Add("KSMKPVER", OracleType.NVarChar).Value = dwData["KSMKPVER"].ToString(); 
          or1.Parameters.Add("KSMKPUZWECK", OracleType.NVarChar).Value = dwData["KSMKPUZWECK"].ToString(); 
          or1.Parameters.Add("KSMKPUVER", OracleType.NVarChar).Value = dwData["KSMKPUVER"].ToString(); 
          or1.Parameters.Add("KSMKSZWECK", OracleType.NVarChar).Value = dwData["KSMKSZWECK"].ToString(); 
          or1.Parameters.Add("KSMKSVER", OracleType.NVarChar).Value = dwData["KSMKSVER"].ToString(); 
          or1.Parameters.Add("KSMKIZWECK", OracleType.NVarChar).Value = dwData["KSMKIZWECK"].ToString(); 
          or1.Parameters.Add("KSMKIVER", OracleType.NVarChar).Value = dwData["KSMKIVER"].ToString(); 
          or1.Parameters.Add("KSMKBEM", OracleType.NVarChar).Value = dwData["KSMKBEM"].ToString(); 
          or1.Parameters.Add("KSMKPPROZ", OracleType.NVarChar).Value = dwData["KSMKPPROZ"].ToString(); 
          or1.Parameters.Add("KSMKPKOST1", OracleType.NVarChar).Value = dwData["KSMKPKOST1"].ToString(); 
          or1.Parameters.Add("KSMKPKOST2", OracleType.NVarChar).Value = dwData["KSMKPKOST2"].ToString(); 
          or1.Parameters.Add("KSMKPKOST3", OracleType.NVarChar).Value = dwData["KSMKPKOST3"].ToString(); 
          or1.Parameters.Add("KSMKPKOST4", OracleType.NVarChar).Value = dwData["KSMKPKOST4"].ToString(); 
          or1.Parameters.Add("KSMKPKOST5", OracleType.NVarChar).Value = dwData["KSMKPKOST5"].ToString(); 
          or1.Parameters.Add("KSMKPMZT", OracleType.NVarChar).Value = dwData["KSMKPMZT"].ToString(); 
          or1.Parameters.Add("KSMKPMZTK1", OracleType.NVarChar).Value = dwData["KSMKPMZTK1"].ToString(); 
          or1.Parameters.Add("KSMKPMZTK2", OracleType.NVarChar).Value = dwData["KSMKPMZTK2"].ToString(); 
          or1.Parameters.Add("KSMKPMZTK3", OracleType.NVarChar).Value = dwData["KSMKPMZTK3"].ToString(); 
          or1.Parameters.Add("KSMKPMZTK4", OracleType.NVarChar).Value = dwData["KSMKPMZTK4"].ToString(); 
          or1.Parameters.Add("KSMKPMZTK5", OracleType.NVarChar).Value = dwData["KSMKPMZTK5"].ToString(); 
          or1.Parameters.Add("KSMKPPZT", OracleType.NVarChar).Value = dwData["KSMKPPZT"].ToString(); 
          or1.Parameters.Add("KSMKPPZTK1", OracleType.NVarChar).Value = dwData["KSMKPPZTK1"].ToString(); 
          or1.Parameters.Add("KSMKPPZTK2", OracleType.NVarChar).Value = dwData["KSMKPPZTK2"].ToString(); 
          or1.Parameters.Add("KSMKPPZTK3", OracleType.NVarChar).Value = dwData["KSMKPPZTK3"].ToString(); 
          or1.Parameters.Add("KSMKPPZTK4", OracleType.NVarChar).Value = dwData["KSMKPPZTK4"].ToString(); 
          or1.Parameters.Add("KSMKPPZTK5", OracleType.NVarChar).Value = dwData["KSMKPPZTK5"].ToString(); 
          or1.Parameters.Add("KSMKPRZT", OracleType.NVarChar).Value = dwData["KSMKPRZT"].ToString(); 
          or1.Parameters.Add("KSMKPRZTK1", OracleType.NVarChar).Value = dwData["KSMKPRZTK1"].ToString(); 
          or1.Parameters.Add("KSMKPRZTK2", OracleType.NVarChar).Value = dwData["KSMKPRZTK2"].ToString(); 
          or1.Parameters.Add("KSMKPRZTK3", OracleType.NVarChar).Value = dwData["KSMKPRZTK3"].ToString(); 
          or1.Parameters.Add("KSMKPRZTK4", OracleType.NVarChar).Value = dwData["KSMKPRZTK4"].ToString(); 
          or1.Parameters.Add("KSMKPRZTK5", OracleType.NVarChar).Value = dwData["KSMKPRZTK5"].ToString(); 
          or1.Parameters.Add("KSMKPRPT", OracleType.NVarChar).Value = dwData["KSMKPRPT"].ToString(); 
          or1.Parameters.Add("KSMKPRPTK1", OracleType.NVarChar).Value = dwData["KSMKPRPTK1"].ToString(); 
          or1.Parameters.Add("KSMKPRPTK2", OracleType.NVarChar).Value = dwData["KSMKPRPTK2"].ToString(); 
          or1.Parameters.Add("KSMKPRPTK3", OracleType.NVarChar).Value = dwData["KSMKPRPTK3"].ToString(); 
          or1.Parameters.Add("KSMKPRPTK4", OracleType.NVarChar).Value = dwData["KSMKPRPTK4"].ToString(); 
          or1.Parameters.Add("KSMKPRPTK5", OracleType.NVarChar).Value = dwData["KSMKPRPTK5"].ToString(); 
          or1.Parameters.Add("KSMKPPZG1", OracleType.NVarChar).Value = dwData["KSMKPPZG1"].ToString(); 
          or1.Parameters.Add("KSMKPPZG2", OracleType.NVarChar).Value = dwData["KSMKPPZG2"].ToString(); 
          or1.Parameters.Add("KSMKPPZG3", OracleType.NVarChar).Value = dwData["KSMKPPZG3"].ToString(); 
          or1.Parameters.Add("KSMKPPZG4", OracleType.NVarChar).Value = dwData["KSMKPPZG4"].ToString(); 
          or1.Parameters.Add("KSMKPPZG5", OracleType.NVarChar).Value = dwData["KSMKPPZG5"].ToString(); 
          or1.Parameters.Add("KSMKPPZG6", OracleType.NVarChar).Value = dwData["KSMKPPZG6"].ToString(); 
          or1.Parameters.Add("KSMKPLZTST", OracleType.NVarChar).Value = dwData["KSMKPLZTST"].ToString(); 
          or1.Parameters.Add("KSMKPNA", OracleType.NVarChar).Value = dwData["KSMKPNA"].ToString(); 
          or1.Parameters.Add("KSMKPMG", OracleType.NVarChar).Value = dwData["KSMKPMG"].ToString(); 
          or1.Parameters.Add("KSMKPMKME", OracleType.NVarChar).Value = dwData["KSMKPMKME"].ToString(); 
          or1.Parameters.Add("KSMKPMK", OracleType.NVarChar).Value = dwData["KSMKPMK"].ToString(); 
          or1.Parameters.Add("KSMKPMKF", OracleType.NVarChar).Value = dwData["KSMKPMKF"].ToString(); 
          or1.Parameters.Add("KSMKPERL", OracleType.NVarChar).Value = dwData["KSMKPERL"].ToString(); 
          or1.Parameters.Add("KSMKPDAT", OracleType.NVarChar).Value = dwData["KSMKPDAT"].ToString(); 
          or1.Parameters.Add("KSMKPUPROZ", OracleType.NVarChar).Value = dwData["KSMKPUPROZ"].ToString(); 
          or1.Parameters.Add("KSMKPUKOST1", OracleType.NVarChar).Value = dwData["KSMKPUKOST1"].ToString(); 
          or1.Parameters.Add("KSMKPUKOST2", OracleType.NVarChar).Value = dwData["KSMKPUKOST2"].ToString(); 
          or1.Parameters.Add("KSMKPUKOST3", OracleType.NVarChar).Value = dwData["KSMKPUKOST3"].ToString(); 
          or1.Parameters.Add("KSMKPUKOST4", OracleType.NVarChar).Value = dwData["KSMKPUKOST4"].ToString(); 
          or1.Parameters.Add("KSMKPUKOST5", OracleType.NVarChar).Value = dwData["KSMKPUKOST5"].ToString(); 
          or1.Parameters.Add("KSMKPUMZT", OracleType.NVarChar).Value = dwData["KSMKPUMZT"].ToString(); 
          or1.Parameters.Add("KSMKPUMZTK1", OracleType.NVarChar).Value = dwData["KSMKPUMZTK1"].ToString(); 
          or1.Parameters.Add("KSMKPUMZTK2", OracleType.NVarChar).Value = dwData["KSMKPUMZTK2"].ToString(); 
          or1.Parameters.Add("KSMKPUMZTK3", OracleType.NVarChar).Value = dwData["KSMKPUMZTK3"].ToString(); 
          or1.Parameters.Add("KSMKPUMZTK4", OracleType.NVarChar).Value = dwData["KSMKPUMZTK4"].ToString(); 
          or1.Parameters.Add("KSMKPUMZTK5", OracleType.NVarChar).Value = dwData["KSMKPUMZTK5"].ToString(); 
          or1.Parameters.Add("KSMKPUPZT", OracleType.NVarChar).Value = dwData["KSMKPUPZT"].ToString(); 
          or1.Parameters.Add("KSMKPUPZTK1", OracleType.NVarChar).Value = dwData["KSMKPUPZTK1"].ToString(); 
          or1.Parameters.Add("KSMKPUPZTK2", OracleType.NVarChar).Value = dwData["KSMKPUPZTK2"].ToString(); 
          or1.Parameters.Add("KSMKPUPZTK3", OracleType.NVarChar).Value = dwData["KSMKPUPZTK3"].ToString(); 
          or1.Parameters.Add("KSMKPUPZTK4", OracleType.NVarChar).Value = dwData["KSMKPUPZTK4"].ToString(); 
          or1.Parameters.Add("KSMKPUPZTK5", OracleType.NVarChar).Value = dwData["KSMKPUPZTK5"].ToString(); 
          or1.Parameters.Add("KSMKPURZT", OracleType.NVarChar).Value = dwData["KSMKPURZT"].ToString(); 
          or1.Parameters.Add("KSMKPURZTK1", OracleType.NVarChar).Value = dwData["KSMKPURZTK1"].ToString(); 
          or1.Parameters.Add("KSMKPURZTK2", OracleType.NVarChar).Value = dwData["KSMKPURZTK2"].ToString(); 
          or1.Parameters.Add("KSMKPURZTK3", OracleType.NVarChar).Value = dwData["KSMKPURZTK3"].ToString(); 
          or1.Parameters.Add("KSMKPURZTK4", OracleType.NVarChar).Value = dwData["KSMKPURZTK4"].ToString(); 
          or1.Parameters.Add("KSMKPURZTK5", OracleType.NVarChar).Value = dwData["KSMKPURZTK5"].ToString(); 
          or1.Parameters.Add("KSMKPURPT", OracleType.NVarChar).Value = dwData["KSMKPURPT"].ToString(); 
          or1.Parameters.Add("KSMKPURPTK1", OracleType.NVarChar).Value = dwData["KSMKPURPTK1"].ToString(); 
          or1.Parameters.Add("KSMKPURPTK2", OracleType.NVarChar).Value = dwData["KSMKPURPTK2"].ToString(); 
          or1.Parameters.Add("KSMKPURPTK3", OracleType.NVarChar).Value = dwData["KSMKPURPTK3"].ToString(); 
          or1.Parameters.Add("KSMKPURPTK4", OracleType.NVarChar).Value = dwData["KSMKPURPTK4"].ToString(); 
          or1.Parameters.Add("KSMKPURPTK5", OracleType.NVarChar).Value = dwData["KSMKPURPTK5"].ToString(); 
          or1.Parameters.Add("KSMKPUPZG1", OracleType.NVarChar).Value = dwData["KSMKPUPZG1"].ToString(); 
          or1.Parameters.Add("KSMKPUPZG2", OracleType.NVarChar).Value = dwData["KSMKPUPZG2"].ToString(); 
          or1.Parameters.Add("KSMKPUPZG3", OracleType.NVarChar).Value = dwData["KSMKPUPZG3"].ToString(); 
          or1.Parameters.Add("KSMKPUPZG4", OracleType.NVarChar).Value = dwData["KSMKPUPZG4"].ToString(); 
          or1.Parameters.Add("KSMKPUPZG5", OracleType.NVarChar).Value = dwData["KSMKPUPZG5"].ToString(); 
          or1.Parameters.Add("KSMKPUPZG6", OracleType.NVarChar).Value = dwData["KSMKPUPZG6"].ToString(); 
          or1.Parameters.Add("KSMKPULZTST", OracleType.NVarChar).Value = dwData["KSMKPULZTST"].ToString(); 
          or1.Parameters.Add("KSMKPUNA", OracleType.NVarChar).Value = dwData["KSMKPUNA"].ToString(); 
          or1.Parameters.Add("KSMKPUMG", OracleType.NVarChar).Value = dwData["KSMKPUMG"].ToString(); 
          or1.Parameters.Add("KSMKPUMKME", OracleType.NVarChar).Value = dwData["KSMKPUMKME"].ToString(); 
          or1.Parameters.Add("KSMKPUMK", OracleType.NVarChar).Value = dwData["KSMKPUMK"].ToString(); 
          or1.Parameters.Add("KSMKPUMKF", OracleType.NVarChar).Value = dwData["KSMKPUMKF"].ToString(); 
          or1.Parameters.Add("KSMKPUERL", OracleType.NVarChar).Value = dwData["KSMKPUERL"].ToString(); 
          or1.Parameters.Add("KSMKPUDAT", OracleType.NVarChar).Value = dwData["KSMKPUDAT"].ToString(); 
          or1.Parameters.Add("KSMKSKOST1", OracleType.NVarChar).Value = dwData["KSMKSKOST1"].ToString(); 
          or1.Parameters.Add("KSMKSKOST2", OracleType.NVarChar).Value = dwData["KSMKSKOST2"].ToString(); 
          or1.Parameters.Add("KSMKSKOST3", OracleType.NVarChar).Value = dwData["KSMKSKOST3"].ToString(); 
          or1.Parameters.Add("KSMKSKOST4", OracleType.NVarChar).Value = dwData["KSMKSKOST4"].ToString(); 
          or1.Parameters.Add("KSMKSKOST5", OracleType.NVarChar).Value = dwData["KSMKSKOST5"].ToString(); 
          or1.Parameters.Add("KSMKSMZT", OracleType.NVarChar).Value = dwData["KSMKSMZT"].ToString(); 
          or1.Parameters.Add("KSMKSMZTK1", OracleType.NVarChar).Value = dwData["KSMKSMZTK1"].ToString(); 
          or1.Parameters.Add("KSMKSMZTK2", OracleType.NVarChar).Value = dwData["KSMKSMZTK2"].ToString(); 
          or1.Parameters.Add("KSMKSMZTK3", OracleType.NVarChar).Value = dwData["KSMKSMZTK3"].ToString(); 
          or1.Parameters.Add("KSMKSMZTK4", OracleType.NVarChar).Value = dwData["KSMKSMZTK4"].ToString(); 
          or1.Parameters.Add("KSMKSMZTK5", OracleType.NVarChar).Value = dwData["KSMKSMZTK5"].ToString(); 
          or1.Parameters.Add("KSMKSPZT", OracleType.NVarChar).Value = dwData["KSMKSPZT"].ToString(); 
          or1.Parameters.Add("KSMKSPZTK1", OracleType.NVarChar).Value = dwData["KSMKSPZTK1"].ToString(); 
          or1.Parameters.Add("KSMKSPZTK2", OracleType.NVarChar).Value = dwData["KSMKSPZTK2"].ToString(); 
          or1.Parameters.Add("KSMKSPZTK3", OracleType.NVarChar).Value = dwData["KSMKSPZTK3"].ToString(); 
          or1.Parameters.Add("KSMKSPZTK4", OracleType.NVarChar).Value = dwData["KSMKSPZTK4"].ToString(); 
          or1.Parameters.Add("KSMKSPZTK5", OracleType.NVarChar).Value = dwData["KSMKSPZTK5"].ToString(); 
          or1.Parameters.Add("KSMKSRZT", OracleType.NVarChar).Value = dwData["KSMKSRZT"].ToString(); 
          or1.Parameters.Add("KSMKSRZTK1", OracleType.NVarChar).Value = dwData["KSMKSRZTK1"].ToString(); 
          or1.Parameters.Add("KSMKSRZTK2", OracleType.NVarChar).Value = dwData["KSMKSRZTK2"].ToString(); 
          or1.Parameters.Add("KSMKSRZTK3", OracleType.NVarChar).Value = dwData["KSMKSRZTK3"].ToString(); 
          or1.Parameters.Add("KSMKSRZTK4", OracleType.NVarChar).Value = dwData["KSMKSRZTK4"].ToString(); 
          or1.Parameters.Add("KSMKSRZTK5", OracleType.NVarChar).Value = dwData["KSMKSRZTK5"].ToString(); 
          or1.Parameters.Add("KSMKSRPT", OracleType.NVarChar).Value = dwData["KSMKSRPT"].ToString(); 
          or1.Parameters.Add("KSMKSRPTK1", OracleType.NVarChar).Value = dwData["KSMKSRPTK1"].ToString(); 
          or1.Parameters.Add("KSMKSRPTK2", OracleType.NVarChar).Value = dwData["KSMKSRPTK2"].ToString(); 
          or1.Parameters.Add("KSMKSRPTK3", OracleType.NVarChar).Value = dwData["KSMKSRPTK3"].ToString(); 
          or1.Parameters.Add("KSMKSRPTK4", OracleType.NVarChar).Value = dwData["KSMKSRPTK4"].ToString(); 
          or1.Parameters.Add("KSMKSRPTK5", OracleType.NVarChar).Value = dwData["KSMKSRPTK5"].ToString(); 
          or1.Parameters.Add("KSMKSLZTST", OracleType.NVarChar).Value = dwData["KSMKSLZTST"].ToString(); 
          or1.Parameters.Add("KSMKSNA", OracleType.NVarChar).Value = dwData["KSMKSNA"].ToString(); 
          or1.Parameters.Add("KSMKSMG", OracleType.NVarChar).Value = dwData["KSMKSMG"].ToString(); 
          or1.Parameters.Add("KSMKSMKME", OracleType.NVarChar).Value = dwData["KSMKSMKME"].ToString(); 
          or1.Parameters.Add("KSMKSMK", OracleType.NVarChar).Value = dwData["KSMKSMK"].ToString(); 
          or1.Parameters.Add("KSMKSMKF", OracleType.NVarChar).Value = dwData["KSMKSMKF"].ToString(); 
          or1.Parameters.Add("KSMKIKOST1", OracleType.NVarChar).Value = dwData["KSMKIKOST1"].ToString(); 
          or1.Parameters.Add("KSMKIKOST2", OracleType.NVarChar).Value = dwData["KSMKIKOST2"].ToString(); 
          or1.Parameters.Add("KSMKIKOST3", OracleType.NVarChar).Value = dwData["KSMKIKOST3"].ToString(); 
          or1.Parameters.Add("KSMKIKOST4", OracleType.NVarChar).Value = dwData["KSMKIKOST4"].ToString(); 
          or1.Parameters.Add("KSMKIKOST5", OracleType.NVarChar).Value = dwData["KSMKIKOST5"].ToString(); 
          or1.Parameters.Add("KSMKIMZT", OracleType.NVarChar).Value = dwData["KSMKIMZT"].ToString(); 
          or1.Parameters.Add("KSMKIMZTK1", OracleType.NVarChar).Value = dwData["KSMKIMZTK1"].ToString(); 
          or1.Parameters.Add("KSMKIMZTK2", OracleType.NVarChar).Value = dwData["KSMKIMZTK2"].ToString(); 
          or1.Parameters.Add("KSMKIMZTK3", OracleType.NVarChar).Value = dwData["KSMKIMZTK3"].ToString(); 
          or1.Parameters.Add("KSMKIMZTK4", OracleType.NVarChar).Value = dwData["KSMKIMZTK4"].ToString(); 
          or1.Parameters.Add("KSMKIMZTK5", OracleType.NVarChar).Value = dwData["KSMKIMZTK5"].ToString(); 
          or1.Parameters.Add("KSMKIPZT", OracleType.NVarChar).Value = dwData["KSMKIPZT"].ToString(); 
          or1.Parameters.Add("KSMKIPZTK1", OracleType.NVarChar).Value = dwData["KSMKIPZTK1"].ToString(); 
          or1.Parameters.Add("KSMKIPZTK2", OracleType.NVarChar).Value = dwData["KSMKIPZTK2"].ToString(); 
          or1.Parameters.Add("KSMKIPZTK3", OracleType.NVarChar).Value = dwData["KSMKIPZTK3"].ToString(); 
          or1.Parameters.Add("KSMKIPZTK4", OracleType.NVarChar).Value = dwData["KSMKIPZTK4"].ToString(); 
          or1.Parameters.Add("KSMKIPZTK5", OracleType.NVarChar).Value = dwData["KSMKIPZTK5"].ToString(); 
          or1.Parameters.Add("KSMKIRZT", OracleType.NVarChar).Value = dwData["KSMKIRZT"].ToString(); 
          or1.Parameters.Add("KSMKIRZTK1", OracleType.NVarChar).Value = dwData["KSMKIRZTK1"].ToString(); 
          or1.Parameters.Add("KSMKIRZTK2", OracleType.NVarChar).Value = dwData["KSMKIRZTK2"].ToString(); 
          or1.Parameters.Add("KSMKIRZTK3", OracleType.NVarChar).Value = dwData["KSMKIRZTK3"].ToString(); 
          or1.Parameters.Add("KSMKIRZTK4", OracleType.NVarChar).Value = dwData["KSMKIRZTK4"].ToString(); 
          or1.Parameters.Add("KSMKIRZTK5", OracleType.NVarChar).Value = dwData["KSMKIRZTK5"].ToString(); 
          or1.Parameters.Add("KSMKIRPT", OracleType.NVarChar).Value = dwData["KSMKIRPT"].ToString(); 
          or1.Parameters.Add("KSMKIRPTK1", OracleType.NVarChar).Value = dwData["KSMKIRPTK1"].ToString(); 
          or1.Parameters.Add("KSMKIRPTK2", OracleType.NVarChar).Value = dwData["KSMKIRPTK2"].ToString(); 
          or1.Parameters.Add("KSMKIRPTK3", OracleType.NVarChar).Value = dwData["KSMKIRPTK3"].ToString(); 
          or1.Parameters.Add("KSMKIRPTK4", OracleType.NVarChar).Value = dwData["KSMKIRPTK4"].ToString(); 
          or1.Parameters.Add("KSMKIRPTK5", OracleType.NVarChar).Value = dwData["KSMKIRPTK5"].ToString(); 
          or1.Parameters.Add("KSMKIPZG1", OracleType.NVarChar).Value = dwData["KSMKIPZG1"].ToString(); 
          or1.Parameters.Add("KSMKIPZG2", OracleType.NVarChar).Value = dwData["KSMKIPZG2"].ToString(); 
          or1.Parameters.Add("KSMKIPZG3", OracleType.NVarChar).Value = dwData["KSMKIPZG3"].ToString(); 
          or1.Parameters.Add("KSMKIPZG4", OracleType.NVarChar).Value = dwData["KSMKIPZG4"].ToString(); 
          or1.Parameters.Add("KSMKIPZG5", OracleType.NVarChar).Value = dwData["KSMKIPZG5"].ToString(); 
          or1.Parameters.Add("KSMKIPZG6", OracleType.NVarChar).Value = dwData["KSMKIPZG6"].ToString(); 
          or1.Parameters.Add("KSMKILZTST", OracleType.NVarChar).Value = dwData["KSMKILZTST"].ToString(); 
          or1.Parameters.Add("KSMKINA", OracleType.NVarChar).Value = dwData["KSMKINA"].ToString(); 
          or1.Parameters.Add("KSMKIMG", OracleType.NVarChar).Value = dwData["KSMKIMG"].ToString(); 
          or1.Parameters.Add("KSMKIMKME", OracleType.NVarChar).Value = dwData["KSMKIMKME"].ToString(); 
          or1.Parameters.Add("KSMKIMK", OracleType.NVarChar).Value = dwData["KSMKIMK"].ToString(); 
          or1.Parameters.Add("KSMKIMKF", OracleType.NVarChar).Value = dwData["KSMKIMKF"].ToString(); 
          or1.Parameters.Add("KSMKISBK", OracleType.NVarChar).Value = dwData["KSMKISBK"].ToString(); 
          or1.Parameters.Add("KSMKIBNA", OracleType.NVarChar).Value = dwData["KSMKIBNA"].ToString(); 
          or1.Parameters.Add("KSMKIBZW", OracleType.NVarChar).Value = dwData["KSMKIBZW"].ToString(); 
          or1.Parameters.Add("KSMKIBVERL", OracleType.NVarChar).Value = dwData["KSMKIBVERL"].ToString(); 
          or1.Parameters.Add("KSMKIERL", OracleType.NVarChar).Value = dwData["KSMKIERL"].ToString(); 
          or1.Parameters.Add("KSMKIKOSTI1", OracleType.NVarChar).Value = dwData["KSMKIKOSTI1"].ToString(); 
          or1.Parameters.Add("KSMKIKOSTI2", OracleType.NVarChar).Value = dwData["KSMKIKOSTI2"].ToString(); 
          or1.Parameters.Add("KSMKIKOSTI3", OracleType.NVarChar).Value = dwData["KSMKIKOSTI3"].ToString(); 
          or1.Parameters.Add("KSMKIKOSTI4", OracleType.NVarChar).Value = dwData["KSMKIKOSTI4"].ToString(); 
          or1.Parameters.Add("KSMKIKOSTI5", OracleType.NVarChar).Value = dwData["KSMKIKOSTI5"].ToString(); 
          or1.Parameters.Add("KSMKIMZTKI1", OracleType.NVarChar).Value = dwData["KSMKIMZTKI1"].ToString(); 
          or1.Parameters.Add("KSMKIMZTKI2", OracleType.NVarChar).Value = dwData["KSMKIMZTKI2"].ToString(); 
          or1.Parameters.Add("KSMKIMZTKI3", OracleType.NVarChar).Value = dwData["KSMKIMZTKI3"].ToString(); 
          or1.Parameters.Add("KSMKIMZTKI4", OracleType.NVarChar).Value = dwData["KSMKIMZTKI4"].ToString(); 
          or1.Parameters.Add("KSMKIMZTKI5", OracleType.NVarChar).Value = dwData["KSMKIMZTKI5"].ToString(); 
          or1.Parameters.Add("KSMKIPZTKI1", OracleType.NVarChar).Value = dwData["KSMKIPZTKI1"].ToString(); 
          or1.Parameters.Add("KSMKIPZTKI2", OracleType.NVarChar).Value = dwData["KSMKIPZTKI2"].ToString(); 
          or1.Parameters.Add("KSMKIPZTKI3", OracleType.NVarChar).Value = dwData["KSMKIPZTKI3"].ToString(); 
          or1.Parameters.Add("KSMKIPZTKI4", OracleType.NVarChar).Value = dwData["KSMKIPZTKI4"].ToString(); 
          or1.Parameters.Add("KSMKIPZTKI5", OracleType.NVarChar).Value = dwData["KSMKIPZTKI5"].ToString(); 
          or1.Parameters.Add("KSMKIRZTKI1", OracleType.NVarChar).Value = dwData["KSMKIRZTKI1"].ToString(); 
          or1.Parameters.Add("KSMKIRZTKI2", OracleType.NVarChar).Value = dwData["KSMKIRZTKI2"].ToString(); 
          or1.Parameters.Add("KSMKIRZTKI3", OracleType.NVarChar).Value = dwData["KSMKIRZTKI3"].ToString(); 
          or1.Parameters.Add("KSMKIRZTKI4", OracleType.NVarChar).Value = dwData["KSMKIRZTKI4"].ToString(); 
          or1.Parameters.Add("KSMKIRZTKI5", OracleType.NVarChar).Value = dwData["KSMKIRZTKI5"].ToString(); 
          or1.Parameters.Add("KSMKIRPTKI1", OracleType.NVarChar).Value = dwData["KSMKIRPTKI1"].ToString(); 
          or1.Parameters.Add("KSMKIRPTKI2", OracleType.NVarChar).Value = dwData["KSMKIRPTKI2"].ToString(); 
          or1.Parameters.Add("KSMKIRPTKI3", OracleType.NVarChar).Value = dwData["KSMKIRPTKI3"].ToString(); 
          or1.Parameters.Add("KSMKIRPTKI4", OracleType.NVarChar).Value = dwData["KSMKIRPTKI4"].ToString(); 
          or1.Parameters.Add("KSMKIRPTKI5", OracleType.NVarChar).Value = dwData["KSMKIRPTKI5"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
